<?php
	include '../connect.php';
	include '../functions.inc';
	session_start();

	$first_name = $_POST['prenom'];
	$last_name = $_POST['nom'];
	$street = $_POST['rue'];
	$city = $_POST['ville'];
	$zip = $_POST['cp'];
	$phone = $_POST['phone'];
	
	$sql2 = ("UPDATE customer 
	SET first_name='".mysql_real_escape_string($first_name)."', 
	    last_name='".mysql_real_escape_string($last_name)."',
		street='".mysql_real_escape_string($street)."' ,
		city='".mysql_real_escape_string($city)."',
		zip='".mysql_real_escape_string($zip)."',
		phone='".mysql_real_escape_string($phone)."' 
	WHERE user_name='".mysql_real_escape_string($_SESSION[logname])."'");
		mysql_query($sql2,$db) or die('impossible de modifier le profil'.mysql_error());
		updateDateUser($_SESSION['logname'],$table_name);

		
	
?>